<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:f="http://xmlns.jcp.org/jsf/core">
    <h:head>
        <title>ChoreBoard</title>
    </h:head>
    <h:body>
        <h1>Account Manager</h1>
        <h:form>

            New Password
            <h:inputSecret value="#{userController.theModel.password}"></h:inputSecret>
            <br/><br/>
            Verify Current Password
            <h:inputSecret value="test">
                <f:validator validatorId="Validator.PasswordValidator" /> 
            </h:inputSecret>
            <br/><br/>
            <h:commandButton id="changePassword" value="Change Password" action="#{userController.changePassword()}"/>
            <br/><br/>
            <h:commandButton value="Delete Account" action="#{userController.deleteAccount()}"/>
            <br/><br/>
            <h:message for="changePassword"></h:message>
        </h:form>
        
        <h:form>
            <h:commandButton id="leaveHousehold" value="Leave Household" action="#{userController.leaveHousehold()}" />
            <h:inputHidden>
                <f:validator validatorId="Validator.AdminValidator" />
            </h:inputHidden>
                <br/><br/>
            <h:message for="leaveHousehold"></h:message>
        </h:form>
    </h:body>
    <h:link value="back" outcome="UserHomePage" /><br/>
</html>

